/* Copyright (c) 2004-2024 peigen.info. All rights reserved. */

package info.peigen.hotpot.manage.core.service.processor.result;

import info.peigen.hotpot.common.service.base.processor.Processor;
import info.peigen.hotpot.common.service.base.processor.ProcessorServiceContext;
import info.peigen.hotpot.manage.core.domain.Position;
import info.peigen.hotpot.manage.core.service.processor.AbstractHotpotManageServiceProcessor;
import info.peigen.hotpot.manage.core.service.result.PositionCreateResult;
import info.peigen.hotpot.manage.core.util.convertor.PositionConvertor;
import org.noear.solon.annotation.Component;

/**
 * <b>(PositionCreateResultProcessor)</b>
 * "职位" 创建响应处理器
 *
 * @author Peigen
 * @version 1.0.0
 * @since 2024-06-28
 */
@SuppressWarnings("rawtypes")
@Component
public class PositionCreateResultProcessor extends AbstractHotpotManageServiceProcessor implements Processor {
    @Override
    public Integer level() {
        return 99;
    }

    @Override
    public void execute(ProcessorServiceContext serviceContext) {
        PositionCreateResult result  = (PositionCreateResult) serviceContext.getResult();
        result.fromSuccess(PositionConvertor.INSTANCE.convertToInfo((Position) serviceContext.getDomain()));
    }

}